package hku.cs.lunuo.tools;

import java.io.File;
import java.io.FilenameFilter;

public class TextFileNameFilter implements FilenameFilter {
	private String xx;
	

	public TextFileNameFilter(String xx) {
		super();
		this.xx = xx;
	}


	@Override
	public boolean accept(File dir, String name) {
		if(name.startsWith(xx+".")||(name.startsWith(xx)&&name.length()==xx.length()))
			return true;
		else
			return false;
	}
	
	

}
